<h2>New user</h2>
<div class="unitABlock unitABlockLast">
<?php
$forward = $mvc->getObject('forward');
$errors = $mvc->getObject(UsersService::ERROR);
if (isset($forward)){
?>
	<div class="itemOk">
		<p>_i18n{User should get email with registration confirmation.}</p>
	</div>
<?php } else { ?>
<?php	if (isset($errors)){?>
			<div class="itemWarning">
				<ul>
<?php			foreach ($errors as $key => $value){
					echo '<li>' . $value . '</li>'; }?>
				</ul>
			</div>
<?php 	} ?>
<div class="itemWarning">
	_i18n{Note: After registration new user, he should get email with registration confirmation.}
</div>
	<form class="edit" action="/new-user.html" method="post">
		<div class="unitSnColumn">
		
			<div class="itemForm">
				<label>_i18n{User Name}:</label>
				<div class="itemData">
					<input type="text" name="username" class="inpTxt" size="35" value="<? if(isset($_POST['username'])) echo $_POST['username']; ?>" />
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{First Name}:</label>
				<div class="itemData">
					<input type="text" name="firstname" class="inpTxt" size="35" value="<? if(isset($_POST['firstname'])) echo $_POST['firstname']; ?>" />
				</div>
			</div>
			
			<div class="itemForm">
				<label>_i18n{Last Name}:</label>
				<div class="itemData">
					<input type="text" name="lastname" class="inpTxt" size="35" value="<? if(isset($_POST['lastname'])) echo $_POST['lastname']; ?>" />
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Email}:</label>
				<div class="itemData">
					<input type="text" name="email" class="inpTxt" size="35" value="<? if(isset($_POST['reg_email'])) echo $_POST['reg_email']; ?>" />
				</div>
			</div>
			<div class="itemForm">
				<label>_i18n{Role}:</label>
				<div class="itemData">
					<select name="role">
						<option value="<?php echo UsersService::ROLE_PR ?>">_i18n{Promoter}</option>
						<option value="<?php echo UsersService::ROLE_BR ?>">_i18n{Bookkeeper}</option>
					</select>
				</div>
			</div>
		</div>
		<div class="unitSnColumn">
				<div class="itemForm">
					<span class="itemData">
						<input type="checkbox" id="frmR18" class="inpChk" name="agreement"/>
						<label for="frmR18">_i18n{I read, understood, and agree to eBids4U} <a href="#" target="blank" title="_i18n{eBid4U User Agreement}">_i18n{User Agreement}</a>.</label>
					</span>
				</div>
			</div>
		<div class="unitBtn">
			<button name="submit"><span><strong>_i18n{Save}</strong></span></button>
			<button name="cancel"><span><strong>_i18n{Discard}</strong></span></button>
		</div>
	</form>
<?php } ?>
</div>